package de.fhkl.strokeprotocol.messages;

/**
 * Message that is sent in response to a login message. It indicates whether or
 * not the login has been successful.
 */
public class LoginAnswerMessage implements IMessage
{
	private static final long serialVersionUID = -5842162013007644136L;

	/** Indicates whether the login has been successful */
	private boolean mSuccessful;

	/**
	 * Message that is sent in response to a login message. It indicates whether
	 * or not the login was successful.
	 * 
	 * @param successful
	 */
	public LoginAnswerMessage(boolean successful)
	{
		mSuccessful = successful;
	}

	/**
	 * Has the login been successful?
	 * 
	 * @return
	 */
	public boolean isSuccessful()
	{
		return mSuccessful;
	}

	/**
	 * Set login result
	 * 
	 * @param successful
	 */
	public void setSuccessful(boolean successful)
	{
		mSuccessful = successful;
	}
}
